<template>
  <div
    v-preventReClick
    @click.stop="emit"
    :class="[type, 'shou']"
    :style="{
      paddingLeft: (width ? 0 : padding) + 'px',
      paddingRight: (width ? 0 : padding) + 'px',
      borderRadius: radius + 'px',
      width: width ? width + 'px' : 'auto',
    }"
  >
    <slot></slot>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    radius: {
      type: Number,
      default: 12,
    },
    type: {
      type: String,
      default: "primary",
    },
    width: Number,
    padding: {
      type: Number,
      default: 12,
    },
    t: String,
  },
  data() {
    return {};
  },
  watch: {},
  methods: {
    emit() {
      this.$emit("handle");
    },
  },
  created() {},
  mounted() {},
};
</script>
<style scoped lang='scss'>
.primary {
  text-align: center;
  font-size: 16px;
  font-family: PingFangSC-Regular, PingFang SC, sans-serif;
  font-weight: 400;
  color: white;
  line-height: 40px;
  box-sizing: border-box;
  height: 40px;
  background: #28b28b;
}
.default:hover {
  color: #333333;
  background: #f7f9fa;
  border: 1px solid #edeff0;
}
.default {
  text-align: center;
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC, sans-serif;
  font-weight: 400;
  color: #666666;
  line-height: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e2e2;
}
.disable {
  text-align: center;
  font-size: 16px;
  font-family: PingFangSC-Regular, PingFang SC, sans-serif;
  font-weight: 400;
  color: white;
  line-height: 40px;
  box-sizing: border-box;
  height: 40px;
  background: #edeff0;
}
.common {
  text-align: center;
  font-size: 16px;
  font-family: PingFangSC-Regular, PingFang SC, sans-serif;
  font-weight: 400;
  color: #28b28b;
  line-height: 38px;
  box-sizing: border-box;
  height: 40px;
  background: #ffffff;
  border: 1px solid #28b28b;
}
</style>
